package com.pan.hisystem.controller;


import com.pan.hisystem.pojo.Prescription;
import com.pan.hisystem.pojo.RespBean;
import com.pan.hisystem.service.IPrescriptionService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author qingyang
 * @since 2022-03-18
 */
@RestController
@RequestMapping("/prescription")
public class PrescriptionController {

    @Autowired
    private IPrescriptionService prescriptionService;

    @ApiOperation(value = "添加处方")
    @PostMapping("/addPrescription")
    public RespBean addPrescription(@RequestBody Prescription prescription){
        return prescriptionService.addPrescription(prescription);
    }

}
